package cn.wx.controller;

import cn.wx.domain.User;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {

    @Value("${server.port}")
    private String port;


    @GetMapping("/user/{id}")
    public User getUser(@PathVariable Long id ){
       return  new User(id,"王天霸","爱吃牛马"+port);
    }


}
